CONFIG += qt warn_on
contains(QT_BUILD_PARTS, tools): CONFIG += uitools
else : DEFINES += QT_NO_UITOOLS

win32 : Debug : CONFIG += console

INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD

QT += webkit network

PJSIPINC += "D:/cpptools/pjproject-1.5.5/pjsip/include" \
		D:/cpptools/pjproject-1.5.5/pjlib/include \
		D:/cpptools/pjproject-1.5.5/pjlib-util/include \
		D:/cpptools/pjproject-1.5.5/pjmedia/include \
		D:/cpptools/pjproject-1.5.5/pjnath/include
		
PJSIPLIB += -L"D:/cpptools/pjproject-1.5.5/lib" \
				-lpjsua-i686-pc-mingw32 \
				-lpjsip-ua-i686-pc-mingw32 \
				-lpjsip-simple-i686-pc-mingw32 \
				-lpjmedia-i686-pc-mingw32 \
				-lpjmedia-audiodev-i686-pc-mingw32 \
				-lpjmedia-codec-i686-pc-mingw32 \
				-lpjnath-i686-pc-mingw32 \
				-lpjsip-i686-pc-mingw32 \
				-lpjsdp-i686-pc-mingw32 \
				-lpj-i686-pc-mingw32 \
				-lpjlib-util-i686-pc-mingw32 \
				-lspeex-i686-pc-mingw32 \
				-lportaudio-i686-pc-mingw32 \
				-lgsmcodec-i686-pc-mingw32 \
				-lg7221codec-i686-pc-mingw32 \
				-lilbccodec-i686-pc-mingw32 \
				-lmilenage-i686-pc-mingw32 \
				-lresample-i686-pc-mingw32 \
				-lsrtp-i686-pc-mingw32
				
MINGWLIB += -L"D:/MinGW-4.4.0/lib" \
				-lwsock32 -lws2_32 -lole32 -ldsound -lwinmm

win32 {
    DEFINES += GITVERSION=0
    DEFINES += GITCHANGENUMBER=0
    DEFINES -= UNICODE
    
}
!win32 {
    exists($$PWD/../.git/HEAD) {
        # Share object files for faster compiling
        RCC_DIR     = $$PWD/.rcc
        UI_DIR      = $$PWD/.ui
        MOC_DIR     = $$PWD/.moc
        OBJECTS_DIR = $$PWD/.obj

        GITVERSION=$$system(git log -n1 --pretty=format:%h)
        DEFINES += GITVERSION=\"\\\"$$GITVERSION\\\"\"
        GITCHANGENUMBER=$$system(git log --pretty=format:%h | wc -l)
        DEFINES += GITCHANGENUMBER=\"\\\"$$GITCHANGENUMBER\\\"\"
    } else {
        DEFINES += GITVERSION=\"\\\"0\\\"\"
        DEFINES += GITCHANGENUMBER=\"\\\"0\\\"\"
    }
}

FORMS += \
    aboutdialog.ui \
    addbookmarkdialog.ui \
    acceptlanguagedialog.ui \
    bookmarks.ui \
    downloaditem.ui \
    downloads.ui \
    passworddialog.ui \
    proxy.ui \
    searchbanner.ui \
    settings.ui \
    servicewidget.ui \
    loginwindow.ui

HEADERS += \
    aboutdialog.h \
    acceptlanguagedialog.h \
    bookmarks.h \
    browserapplication.h \
    browsermainwindow.h \
    clearprivatedata.h \
    clearbutton.h \
    downloadmanager.h \
    languagemanager.h \
    modelmenu.h \
    networkaccessmanager.h \
    plaintexteditsearch.h \
    searchbar.h \
    searchbutton.h \
    searchlineedit.h \
    settings.h \
    sourcehighlighter.h \
    sourceviewer.h \
    tabbar.h \
    tabwidget.h \
    toolbarsearch.h \
    webactionmapper.h \
    webpage.h \
    webview.h \
    webviewsearch.h \
    xbel.h \
    servicewidget.h \
    loginwindow.h \
    userprofile.h

SOURCES += \
    aboutdialog.cpp \
    acceptlanguagedialog.cpp \
    bookmarks.cpp \
    browserapplication.cpp \
    browsermainwindow.cpp \
    clearprivatedata.cpp \
    clearbutton.cpp \
    downloadmanager.cpp \
    languagemanager.cpp \
    modelmenu.cpp \
    networkaccessmanager.cpp \
    plaintexteditsearch.cpp \
    searchbar.cpp \
    searchbutton.cpp \
    searchlineedit.cpp \
    settings.cpp \
    sourcehighlighter.cpp \
    sourceviewer.cpp \
    tabbar.cpp \
    tabwidget.cpp \
    toolbarsearch.cpp \
    webactionmapper.cpp \
    webpage.cpp \
    webview.cpp \
    webviewsearch.cpp \
    xbel.cpp \
    servicewidget.cpp \
    loginwindow.cpp \
    userprofile.cpp

include(cookiejar/cookiejar.pri)
include(history/history.pri)
include(locationbar/locationbar.pri)
include(networkmonitor/networkmonitor.pri)
include(opensearch/opensearch.pri)
include(qwebplugins/qwebplugins.pri)
include(utils/utils.pri)
include(pjsipwrapper/pjsipwrapper.pri)
include(account/account.pri)
include(session/session.pri)
include(client/client.pri)
include(config/config.pri)
include(service/service.pri)
include(nat/nat.pri)
include(httpclient/httpclient.pri)



RESOURCES += \
    $$PWD/data/data.qrc \
    $$PWD/data/searchengines/searchengines.qrc \
    $$PWD/htmls/htmls.qrc

DISTFILES += ../AUTHORS \
    ../ChangeLog \
    ../LICENSE.GPL2 \
    ../LICENSE.GPL3 \
    ../README

win32 {
    RC_FILE = $$PWD/browser.rc
}

mac {
    ICON = browser.icns
    QMAKE_INFO_PLIST = Info_mac.plist
}

include(../webkittrunk.pri)

unix {
    DATADIR = $$PREFIX/share
    PKGDATADIR = $$DATADIR/arora
    DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
}

win32 {
    include(explorerstyle.pri)
    LIBS += -ladvapi32
}
